{% extends 'home/base.html' %}
{% block title %}Bills{% endblock %}
{% block heading %}Bills{% endblock %}
{% block body %}

<div class="container">
 <form action="/bill/pre_view/" method="POST">{% csrf_token %}
      <div class="input-field col s12">
          <input  type="search" name="target_name" placeholder="默认为全部病人，输入病人姓名以过滤">
          <button type="submit" class="btn">fliter</button>
      </div>
  </form>

  <form action="/bill/" method="POST">{% csrf_token %}
    <div class="input-field col s12">
      <select name="patient" id="patient" class="validate" required>
        {% for patient in patients_list %}
          <option value='{{patient.pk}}'> 病人姓名：{{patient.username}}  病人联系方式{{ patient.email }}</option>
        {% endfor %}
      </select>
    </div>
    <button type="submit" class="btn">View Bills</button>
  </form>
</div>
{% endblock %}